package JvmTest;

/**
 * Created by MtRider on 2021/10/15 20:19
 * description: 栈溢出 java.lang.StackOverflowError
 * -Xss 256k 设置栈大小
 */
public class Demo1_2 {
    public static int count;
    public static void main(String[] args) {
        try {
            method();
        } catch (Throwable e) {
            e.printStackTrace();
            System.out.println(count);
        }
    }
    public static void method(){
        count++;
        method();
    }
}
